libname = 'libwebgen';

IncludePath = ['../']
LibsPath = []   
Libs = []

CommonFlags = ' -Wall -pedantic'

debug = ARGUMENTS.get('debug', 0)
libenv = Environment(CPPFLAGS = CommonFlags)
if int(debug):
	libenv.Append(CPPFLAGS = ' -g')

files = Split("""
	element.cpp
	text.cpp
	button.cpp
	select.cpp
	checkbox.cpp
	radio.cpp
	script.cpp
	form.cpp
	xhtml_gen/content.cpp
	xhtml_gen/pc_data.cpp
	xhtml_gen/stylesheet.cpp
	xhtml_gen/stylesheet_rule.cpp
	xhtml_gen/tag.cpp
	xhtml_gen/tag_trait.cpp
	xhtml_gen/tag_trait_manager.cpp
	xhtml_gen/xhtml_doc.cpp
	xhtml_gen/xhtml_element.cpp
""");

lib = libenv.SharedLibrary(target = libname, source = files, CPPPATH = IncludePath, LIBS = Libs, LIBPATH = LibsPath)
obj = libenv.Install("/usr/lib",lib)
libenv.Alias('install',"/usr/lib")

